package com.lanren.common.base;

import android.graphics.drawable.Drawable;
import android.support.annotation.DrawableRes;
import android.support.annotation.StringRes;
import android.view.View;

import com.lanren.common.interfaces.DialogClickListener;

/**
 * @ClassName IView
 * @Description TODO
 * @Author chongheng.wang
 * @Date 2019/9/2 13:56
 * @Version 1.0
 */
public interface IView {
    /**
     * 显示加载
     */
    void showLoading();

    /**
     * 显示加载完成
     */
    void showComplete();

    /**
     * 显示空提示
     */
    void showEmpty();

    /**
     * 显示网络错误提示
     */
    void showNetError(View view);

    /**
     * 显示自定义提示
     */
    void showLayout(View view, @DrawableRes int iconId, @StringRes int textId);

    void showLayout(Drawable drawable, CharSequence hint);

    void showError(int code, String msg);

    /**
     * 显示信息
     */
    void showMessage(String message);

    void showMessageDialog(String message, boolean isRadio, DialogClickListener dialogClickListener);

    void handleError(Exception e);
}
